<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
    <title>Admin</title>
    <link rel='stylesheet' href='<%- rootUrl %>/res/adapter.css' />
    <script src="<%- rootUrl %>/node_modules/jquery/dist/jquery.min.js"></script>
    <script src="<%- rootUrl %>/res/adapter.js"></script>
    <style>
        td, th {padding:10px}
    </style>
</head>
<body class="body-margin">
<alljs-widget><message-top><%- message %></message-top></alljs-widget>
<table>
    <tr style="text-align: left"><th style="width:40%">项目</th><th style="width:40%">详细说明</th><th>执行</th></tr>
    <tr>
        <td>升级为管理员</td><td></td>
        <td><button id="set-admin" type="button" onclick="postRequest('./setadmin')">do</button></td>
    </tr>
    <tr>
        <td>降级为普通用户</td><td></td>
        <td><button id="set-normal" type="button" onclick="postRequest('./setguest')">do</button></td>
    </tr>
    <tr>
        <td>删除多余用户</td><td></td>
        <td><button id="del-redundantusers" type="button" onclick="postRequest('./deleteusers')">do</button></td>
    </tr>
    <tr>
        <td>清理错误文章</td><td></td>
        <td><button id="cleanup-article" type="button" onclick="postRequest('./cleanuparticle')">do</button></td>
    </tr>
    <tr>
        <td>重设文章检索文件</td><td></td>
        <td><button id="reset-article-txt" type="button" onclick="postRequest('/resetarticletxt')">do</button></td>
    </tr>
    <tr>
        <td>删除所有session</td><td></td>
        <td><button id="del-session" type="button" onclick="postRequest('./deletesession')">do</button></td>
    </tr>
    <tr>
        <td>备份/恢复数据</td><td></td>
        <td><button id="backup-data" type="button">do</button></td>
    </tr>
    <tr>
        <td>测试发送邮件</td><td></td>
        <td><button id="test-email" type="button" onclick="postRequest('/testmail')">do</button></td>
    </tr>
    <tr>
        <td>测试发送短信</td><td></td>
        <td><button id="test-sms" type="button" onclick="postRequest('./testsms')">do</button></td>
    </tr>
    <tr>
        <td>关闭站点服务实例</td><td></td>
        <td><button id="close-server" type="button" onclick="postRequest('/shutdownserver')">do</button></td>
    </tr>
</table>
</body>
</html>